import jwx from '@/common/jwx'
// import vin from "./vin.png"
export default function(callback) {
	let promise;
	if (typeof callback !== 'function') {
		promise = new Promise((resolve, reject) => {
			callback = function(resolvedata, rejectdata) {
				if (resolvedata) {
					resolve(resolvedata);
				} else {
					reject(rejectdata);
				}
			};
		});
	}
	// callback(String(
	// 	"http://img.gpsserver.cn:20080/231020/102009115416977_231020091154_AJSCWnaeJWbwrEYwnYyiAB24ksfNreiT.jpg"
	// 	))
	jwx.wxchooseImage(function(data) {
		callback(String(data))
	})
	return promise;
}